import { reactive, ref, watchEffect } from "vue";
// 示例watchEffect
const state = reactive({ a: 1, b: 2 });
const count = ref(0);

watchEffect(() => {
  console.log(state.a, count.value); // 这里面不依赖state.b
});

// 多次改变只会触发一次watchEffect，和运行render函数一样
state.a++;
state.a++;
state.a++;
state.a++;
state.a++;
count.value++;
count.value++;
count.value++;
count.value++;

